
		Imports Acceso_a_Datos.Datos
		Namespace BO
		Partial Public Class tAreas
# Region "tIntereses_x_Persona"
	private mlistatIntereses_x_Persona As New List (Of tIntereses_x_Persona)
Public Property ListatIntereses_x_Persona As System.Collections.Generic.List(Of tIntereses_x_Persona)
Get
dim mtIntereses_x_Persona As New tIntereses_x_Persona
mlistatIntereses_x_Persona =mtIntereses_x_Persona.TraerFiltradoListOf("IdAreas",Me.IdAreas)
Return mlistatIntereses_x_Persona
End Get
Set
RemoveAllListatIntereses_x_Persona()
If Not (Value Is Nothing) Then
Dim otIntereses_x_Persona As tIntereses_x_Persona
	For Each otIntereses_x_Persona in Value
		AddListatIntereses_x_Persona(otIntereses_x_Persona)
	Next
End If
End Set
End Property


		
		
	   Public Sub AddListatIntereses_x_Persona(newtIntereses_x_Persona As tIntereses_x_Persona)
	If (mlistatIntereses_x_Persona Is Nothing) Then
		mlistatIntereses_x_Persona = new System.Collections.Generic.List(Of tIntereses_x_Persona)
	End If
	If Not mlistatIntereses_x_Persona.Contains(newtIntereses_x_Persona) Then
		mlistatIntereses_x_Persona.Add(newtIntereses_x_Persona)
		newtIntereses_x_Persona.tAreas = Me
	End If
End Sub

	   
	   
	   
	   Public Sub RemoveListatIntereses_x_Persona(oldtIntereses_x_Persona As tIntereses_x_Persona)
	If (mlistatIntereses_x_Persona.Contains(oldtIntereses_x_Persona)) Then
		mlistatIntereses_x_Persona.Remove(oldtIntereses_x_Persona)
		oldtIntereses_x_Persona.tAreas = Nothing
	End If
End Sub
	
			
			Public Sub RemoveAllListatIntereses_x_Persona()
	If Not (mlistatIntereses_x_Persona Is Nothing)
		Dim tmp_listatIntereses_x_Persona As System.Collections.ArrayList = new System.Collections.ArrayList()
		Dim oldtIntereses_x_Persona As tIntereses_x_Persona
		For Each oldtIntereses_x_Persona in mlistatIntereses_x_Persona
			tmp_listatIntereses_x_Persona.Add(oldtIntereses_x_Persona)
		Next
	mlistatIntereses_x_Persona.Clear()
	For Each oldtIntereses_x_Persona in tmp_listatIntereses_x_Persona
		oldtIntereses_x_Persona = Nothing
	Next
	tmp_listatIntereses_x_Persona.Clear()
	End If
End Sub

# End Region
# Region "tSolicitudes"
	private mlistatSolicitudes As New List (Of tSolicitudes)
Public Property ListatSolicitudes As System.Collections.Generic.List(Of tSolicitudes)
Get
dim mtSolicitudes As New tSolicitudes
mlistatSolicitudes =mtSolicitudes.TraerFiltradoListOf("IdAreas",Me.IdAreas)
Return mlistatSolicitudes
End Get
Set
RemoveAllListatSolicitudes()
If Not (Value Is Nothing) Then
Dim otSolicitudes As tSolicitudes
	For Each otSolicitudes in Value
		AddListatSolicitudes(otSolicitudes)
	Next
End If
End Set
End Property


		
		
	   Public Sub AddListatSolicitudes(newtSolicitudes As tSolicitudes)
	If (mlistatSolicitudes Is Nothing) Then
		mlistatSolicitudes = new System.Collections.Generic.List(Of tSolicitudes)
	End If
	If Not mlistatSolicitudes.Contains(newtSolicitudes) Then
		mlistatSolicitudes.Add(newtSolicitudes)
		newtSolicitudes.tAreas = Me
	End If
End Sub

	   
	   
	   
	   Public Sub RemoveListatSolicitudes(oldtSolicitudes As tSolicitudes)
	If (mlistatSolicitudes.Contains(oldtSolicitudes)) Then
		mlistatSolicitudes.Remove(oldtSolicitudes)
		oldtSolicitudes.tAreas = Nothing
	End If
End Sub
	
			
			Public Sub RemoveAllListatSolicitudes()
	If Not (mlistatSolicitudes Is Nothing)
		Dim tmp_listatSolicitudes As System.Collections.ArrayList = new System.Collections.ArrayList()
		Dim oldtSolicitudes As tSolicitudes
		For Each oldtSolicitudes in mlistatSolicitudes
			tmp_listatSolicitudes.Add(oldtSolicitudes)
		Next
	mlistatSolicitudes.Clear()
	For Each oldtSolicitudes in tmp_listatSolicitudes
		oldtSolicitudes = Nothing
	Next
	tmp_listatSolicitudes.Clear()
	End If
End Sub

# End Region
# Region "tTrabajos"
	private mlistatTrabajos As New List (Of tTrabajos)
Public Property ListatTrabajos As System.Collections.Generic.List(Of tTrabajos)
Get
dim mtTrabajos As New tTrabajos
mlistatTrabajos =mtTrabajos.TraerFiltradoListOf("IdAreas",Me.IdAreas)
Return mlistatTrabajos
End Get
Set
RemoveAllListatTrabajos()
If Not (Value Is Nothing) Then
Dim otTrabajos As tTrabajos
	For Each otTrabajos in Value
		AddListatTrabajos(otTrabajos)
	Next
End If
End Set
End Property


		
		
	   Public Sub AddListatTrabajos(newtTrabajos As tTrabajos)
	If (mlistatTrabajos Is Nothing) Then
		mlistatTrabajos = new System.Collections.Generic.List(Of tTrabajos)
	End If
	If Not mlistatTrabajos.Contains(newtTrabajos) Then
		mlistatTrabajos.Add(newtTrabajos)
		newtTrabajos.tAreas = Me
	End If
End Sub

	   
	   
	   
	   Public Sub RemoveListatTrabajos(oldtTrabajos As tTrabajos)
	If (mlistatTrabajos.Contains(oldtTrabajos)) Then
		mlistatTrabajos.Remove(oldtTrabajos)
		oldtTrabajos.tAreas = Nothing
	End If
End Sub
	
			
			Public Sub RemoveAllListatTrabajos()
	If Not (mlistatTrabajos Is Nothing)
		Dim tmp_listatTrabajos As System.Collections.ArrayList = new System.Collections.ArrayList()
		Dim oldtTrabajos As tTrabajos
		For Each oldtTrabajos in mlistatTrabajos
			tmp_listatTrabajos.Add(oldtTrabajos)
		Next
	mlistatTrabajos.Clear()
	For Each oldtTrabajos in tmp_listatTrabajos
		oldtTrabajos = Nothing
	Next
	tmp_listatTrabajos.Clear()
	End If
End Sub

# End Region


# Region "Lecturas que devuelven listas"
Public Function TraerTodosListOf() As List(Of tAreas)
            Dim dtDatos As DataTable
            Dim listatAreas As New List(Of tAreas)
            Dim param As [String]
            param = (Me.mNombreEntidad + "_SelectAll")
            dtDatos = Me.ServidorDatos.TraerDataTable(param)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtAreas As New tAreas
				mtAreas.IdAreas = CType(dr.Item("IdAreas"),Integer)
				mtAreas.Traer_objeto()
            	listatAreas.Add( mtAreas)
    		Next dr
Return listatAreas
End Function

Public Function TraerFiltradoListOf(ByVal Filtro As [String], ByVal Args As Object) As List(Of tAreas)
            Dim dtDatos As DataTable
            Dim param As [String]
            Dim listatAreas As New List(Of tAreas)
            param = (Me.mNombreEntidad + "_Tx")
            param = (param + Filtro.ToString)
            dtDatos = Me.ServidorDatos.TraerDataTable(param, Args)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtAreas As New tAreas
				mtAreas.IdAreas = CType(dr.Item("IdAreas"),Integer)
				mtAreas.Traer_objeto()
            	listatAreas.Add( mtAreas)
    		Next dr
Return listatAreas
End Function

Public Function TraerFiltradoLikeListOf(ByVal Filtro As [String], ByVal Args As Object) As List(Of tAreas)
            Dim dtDatos As DataTable
            Dim param As [String]
            Dim listatAreas As New List(Of tAreas)
            param = (Me.mNombreEntidad + "_TxLike")
            param = (param + Filtro.ToString)
            dtDatos = Me.ServidorDatos.TraerDataTable(param, Args)
            For Each dr As DataRow In dtDatos.Rows
            Dim mtAreas As New tAreas
				mtAreas.IdAreas = CType(dr.Item("IdAreas"),Integer)
				mtAreas.Traer_objeto()
            	listatAreas.Add( mtAreas)
    		Next dr
Return listatAreas
End Function
# End Region

End Class
End Namespace
